home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1997 May / EnigmA AMIGA RUN 18 (1997)(G.R. Edizioni)(IT)[!][issue 1997-05][EAR-CD II].iso / softwareupdate / system / amigados / files / examples.doc < prev    next >
Text File  |  1996-10-10  |  2KB  |  40 lines

  1. 2  FILES - EXAMPLES
  2.  
  3. Example 1
  4.   This program collects ten integer values from the user, and
  5.   saves them in a file called "HighScore.dat" on the RAM disk.
  6.  
  7. Example 2
  8.   This program will reads ten integer values from an already
  9.   existing file called "HighScore.dat" which is located on the
  10.   RAM disk. (This file was created by Example1.)
  11.  
  12. Example 3
  13.   This program simply writes two strings to a file, moves the
  14.   file cursor back some characters and then collects some
  15.   characters in the middle of the file. This example does
  16.   exactly what is explained in picture "ReadWrite.pic".
  17.  
  18. Example 4
  19.   This program will open an already existing file and update
  20.   the values in it (we simply add 50 to each value). Since we
  21.   do not want any other program to destroy our updated values
  22.   we will lock the file exclusively while we are using it.
  23.  
  24.   Since we want to put an exclusive lock on an already existing
  25.   file we have to use the new "OpenFromLock()" function to open
  26.   the file once we have successfully locked it. This example
  27.   needs dos library V36 or higher.
  28.  
  29. Example 5
  30.   This example demonstrates how you can write a (very) simple
  31.   data base program. In this data base you can add names of
  32.   persons and their telephone numbers. Whenever you want you
  33.   can display the complete user list.
  34.  
  35.   This example uses a "Console" window which has not been
  36.   explained yet. It is therefore a bit difficult, and if you
  37.   are unfamiliar with AmigaDOS you should skip this example for
  38.   the moment and look at it later.
  39.  
  40.